﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Model
{
    public class D_PayNecessityObject
    {
        private System.Int32 db_OID;
        private System.String db_PayNecessity;

        public System.Int32 Db_OID
        {
            get { return db_OID; }
            set { db_OID = value; }
        }
        public System.String Db_PayNecessity
        {
            get { return db_PayNecessity; }
            set { db_PayNecessity = value; }
        }

        public void Data2Object(DataRow value)
        {
            if (value["OID"] != DBNull.Value)
                db_OID = System.Int32.Parse(value["OID"].ToString());
            db_PayNecessity = value["PayNecessity"].ToString();
        }

        public DataRow Object2Data(ref DataRow value)
        {
            value["OID"] = db_OID;
            value["PayNecessity"] = db_PayNecessity;
            return value;
        }
    } // end of class
}
